package com.dsg.service.oil.impl;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.dsg.dao.oil.DsgOilInfoMapper;
import com.dsg.entity.dto.CardTypeDto;
import com.dsg.entity.oil.DsgOilCardtype;
import com.dsg.entity.oil.DsgOilInfo;
import com.dsg.service.base.impl.BaseServiceImpl;
import com.dsg.service.oil.IDsgOilInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("dsgOilInfoService")
public class DsgOilInfoServiceImpl extends BaseServiceImpl<DsgOilInfoMapper, DsgOilInfo> implements IDsgOilInfoService {

    @Autowired
    private DsgOilInfoMapper dsgOilInfoMapper;

    @Override
    public IPage<DsgOilInfo> selectByList(Page<DsgOilInfo> page,DsgOilInfo dsgOilInfo) {
        return page.setRecords(dsgOilInfoMapper.selectByList(page, dsgOilInfo));
    }

    @Override
    public String getOilComByCardType(CardTypeDto dto) {
        return baseMapper.getOilComByCardType(dto);
    }

    @Override
    public List<DsgOilCardtype> getDsgOilCardType(DsgOilCardtype dsgOilCardtype) {
        return baseMapper.getDsgOilCardType(dsgOilCardtype);
    }
}
